package com.smarttest.portal.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.smarttest.portal.pojo.Test;
import com.smarttest.portal.service.TestService;

@Controller
public class TestController {
	 @Autowired
	 private TestService testService;
	 
	 @RequestMapping("/test/{testId}.action")
	 @ResponseBody
	 public Test getTestById(@PathVariable Integer testId){
		 Test test = testService.getTestById(testId);
		 return test;
	 }
}
